package com.telecom.restaurant.dao;

import com.telecom.restaurant.model.MenuDayToFoodPO;
import com.telecom.restaurant.model.MenuFoodPO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface MenuDayToFoodDao {
    int deleteByMenuIdAndFoodId(@Param("menuDayId") Long menuDayId, @Param("foodId") Long foodId);

    int insert(MenuDayToFoodPO record);

    MenuDayToFoodPO selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(MenuDayToFoodPO record);

    List<MenuFoodPO> selectByMenuDate(@Param("menuDate") Date menuDate, @Param("restaurantId") Long restaurantId);

    List<MenuDayToFoodPO> selectByIds(@Param("idList") List<Long> idList);

    int changeStock(@Param("id") Long id, @Param("count") Integer count);
}